package data;

import java.awt.Color;
import java.awt.Graphics;

public class VectorVisual implements visualizzation {

	@Override
	public void drawDart(Graphics graphics, Dart d) {
		graphics.setColor(d.getColor());
		graphics.fillOval(d.getX() - (d.getDartSize() >> 1), d.getY()
				- (d.getDartSize() >> 1), d.getDartSize(), d.getDartSize());

	}

	@Override
	public void drawPlayer(Graphics graphics, Player p) {
		if ((p.getAbilitaReturnComeParametroUnaAbilitaNonUnIntero() == 1) && p.isAbilityStatus()) {
			graphics.setColor(Color.blue);
			graphics.drawOval(p.getPosition().getX() - 3, p.getPosition().getY() - 3,
					p.getSize() + 6, p.getSize() + 6);
		}
		graphics.setColor(Color.green);
		graphics.fillOval(p.getPosition().getX(), p.getPosition().getY(),
				p.getSize(), p.getSize());
		graphics.setColor(Color.black);
		graphics.drawOval(p.getPosition().getX(), p.getPosition().getY(),
				p.getSize(), p.getSize());
		p.writePlayerInfo(graphics);

	}
	@Override
	public void drawBG(Graphics graphics,GameLoop gl) {
		gl.setBackground(Color.yellow);
		
	}

}
